package com.cai310.lottery;

public final class Welfare3dConstant {
	public static final String KEY = "welfare3d";

	/** 直选复式内容正则表达式 */
	public static final String DIRECT_COMPOUND_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,9}(-\\d{1,2}(,\\d{1,2}){0,9}){2})\\s*$";

	/** 单式内容正则表达式 */
	public static final String SINGLE_REGEX = "^\\s*((?:\\d{1,2}\\D+){2}\\d{1,2})\\s*$";

	/** 组选3组选6复式内容正则表达式 */
	public static final String GROUP3_6_COMPOUND_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,9})\\s*$";

	/** 直选和值复式内容正则表达式 */
	public static final String DIRECT_SUM_COMPOUND_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,27})\\s*$";

	/** 组选和值复式内容正则表达式 */
	public static final String GROUP_SUM_COMPOUND_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,25})\\s*$";
	
	/** 包串复式内容正则表达式 */
	public static final String BAOCHUAN_COMPOUND_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,9})\\s*$";
	
	/** 跨度复式内容正则表达式 */
	public static final String KUADU_REGEX = "^\\s*(\\d{1,5}):(\\d{1,2}(,\\d{1,2}){0,9})\\s*$";

	/** 复式：号码之间的分隔符 */
	public static final String SEPARATOR_FOR_NUMBER = ",";

	/** 复式：直选区间之间的分隔符 */
	public static final String SEPARATOR_FOR_ = "-";

	public static final Integer[] UNITS_DIRECT_SUM = new Integer[] { 
		    1, // 0
			3, // 1
			6, // 2
			10, // 3
			15, // 4
			21, // 5
			28, // 6
			36, // 7
			45, // 8
			55, // 9
			63, // 10
			69, // 11
			73, // 12
			75, // 13
			75, // 14
			73, // 15
			69, // 16
			63, // 17
			55, // 18
			45, // 19
			36, // 20
			28, // 21
			21, // 22
			15, // 23
			10, // 24
			6, // 25
			3, // 26
			1 // 27
	};
	public static final Integer[] UNITS_GROUP_SUM = new Integer[] { 
		    0, // 0
			1, // 1 001
			2, // 2 002,011
			3, // 3 003,012,111
			4, // 4 004,013,022,112
			5, // 5 005,014,023,122,113
			7, // 6 006,015,024,033,114,123,222
			8, // 7 007,016,025,034,115,124,133,223
			10, // 8 008,017,026,035,044,116,125,134,224,233
			12, // 9 009,018,027,036,045,117,126,135,144,225,234,333
			13, // 10 109,118,127,136,145,208,226,235,244,307,334,406,505
			14, // 11 119,128,137,146,155,209,227,236,245,308,335,346,407,506
			15, // 12// 129,138,147,156,228,237,246,255,309,336,345,408,444,507,606
			15, // 13// 139,148,157,166,229,238,247,256,337,346,355,409,445,508,607
			15, // 14// 149,158,167,239,248,257,266,338,347,356,446,455,509,608,707
			15, // 15// 159,168,177,249,258,267,339,348,357,366,447,456,555,609,708
			14, // 16 169,178,259,268,277,349,358,367,448,457,466,556,709,808
			13, // 17 179,188,269,278,359,368,377,449,458,467,557,566,809
			12, // 18 189,279,288,369,378,459,468,477,558,567,666,909
			10, // 19 199,289,379,388,469,478,559,568,577,667
			8, // 20 299,389,479,488,569,578,668,677,
			7, // 21 399,489,588,579,669,678,777,
			5, // 22 499,589,679,688,778
			4, // 23 599,689,779,788,
			3, // 24 699,789,888,
			2, // 25 799,889
			1 // 26 899
	};
	public static final Integer[] UNITS_GROUP3_SUM = new Integer[] { 
		    0, // 0
			1, // 1 001
			2, // 2 002,011
			2, // 3 003,111
			3, // 4 004,022,112
			3, // 5 005,122,113
			4, // 6 006,033,114,222
			4, // 7 007,115,133,223
			5, // 8 008,044,116,224,233
			5, // 9 009,117,144,225,333
			5, // 10 118,226,244,334,505
			4, // 11 119,155,227,335
			4, // 12 228,255,336,444
			5, // 13 166,229,337,355,445
			5, // 14 266,338,446,455,707
			4, // 15 339,366,447,555
			5, // 16 277,448,466,556,808
			5, // 17 188,377,449,557,566
			4, // 18 288,477,558,666
			5, // 19 199,388,559,577,667
			4, // 20 299,488,668,677,
			4, // 21 399,588,669,777,
			3, // 22 499,688,778
			3, // 23 599,779,788,
			2, // 24 699,888,
			2, // 25 799,889
			1 // 26 899
	};
	public static final Integer[] UNITS_KUADU = new Integer[] { 
		10, // 0
		54, // 1 
		96, // 2 
		126, // 3
		144, // 4
		150, // 5 
		144, // 6
		126, // 7
		96, // 8 
		54, // 9 
    };
	public static final Integer[] UNITS_G3_KUADU = new Integer[] { 
		0, // 0
		18, // 1 
		16, // 2 
		14, // 3
		12, // 4
		10, // 5 
		8, // 6
		6, // 7
		4, // 8 
		2, // 9 
    };
	public static final Integer[] UNITS_G6_KUADU = new Integer[] { 
		0, // 0
		0, // 1 
		8, // 2 
		14, // 3
		18, // 4
		20, // 5 
		20, // 6
		18, // 7
		14, // 8 
		8, // 9 
    };
}
